<template>
  <i-dialog
    title="提示"
    :visible="visible"
    width="642px"
    :close-on-click-modal="false"
    append-to-body
    @close="cancel"
  >
    <p>
      您名下的<span class="span-red">{{ stationNames }}</span
      >电站为套餐电站,如下架该{{
        type === 'andEnergy' ? '和能量' : '通用时长卡'
      }}将导致用户无法充电，请为电站设置时长卡套餐、通用时长卡、和能量中的至少一种，才可{{
        operation === 'off_sale' ? '下架' : '编辑'
      }}该{{ type === 'andEnergy' ? '和能量' : '通用时长卡' }}。
    </p>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancel" type="primary">确 定</el-button>
    </span>
  </i-dialog>
</template>
<script>
export default {
  name: 'DelWarnDlg',
  props: {
    visible: {
      type: Boolean,
      required: true,
    },
    stationNames: {
      type: String,
      require: true,
    },
    type: {
      type: String,
      require: true,
    },
    operation: {
      type: String,
      default: 'off_sale',
    },
  },
  methods: {
    cancel() {
      this.$emit('update:visible', false)
      this.$emit('closeOuter')
    },
  },
}
</script>
<style lang="scss" scoped>
.span-red {
  color: red;
}
</style>
